Audio playing and transmitting methods and apparatuses

ABSTRACT

The present disclosure provides audio playing and transmitting methods and apparatuses, so as to reduce a playback delay of a control apparatus. An audio playing method provided the embodiment of the present disclosure includes: receiving a first system time data packet transmitted from a smart television, wherein the first system time data packet includes a first system time of the smart television at a sound transmission start time; calculating a difference serving as a first difference between a current second system time of a control apparatus and the first system time; receiving audio data transmitted from the smart television; calculating, according to the first difference, a network delay of transmission of the audio data between the smart television and the control apparatus; and abandoning the audio data when the network delay is greater than a preset threshold.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/588,510 filed on Sep. 30, 2019, which is a continuation ofInternational Application No. PCT/CN2019/104971 filed Sep. 9, 2019,which claims the benefit and priority of Chinese Patent Application No.201811565526.9 filed Dec. 20, 2018, Chinese Patent Application No.201811565099.4 filed Dec. 20, 2018, and Chinese Patent Application No.201811565963.0 filed Dec. 20, 2018. The entire disclosures of the aboveapplications are incorporated herein by reference.

FIELD

The present disclosure relates to smart devices, and particularlyrelates to audio playing and transmitting methods and apparatuses.

BACKGROUND

This section provides background information related to the presentdisclosure which is not necessarily prior art.

With the continuous development of television technologies, TV productsare increasingly recognized and used by users. On some occasions, manyusers often turn the TV to silent or turn down the TV sound whenwatching TV programs in order to avoid the influence on the rest offamily members, which in some extent affects the TV program watchingexperience negatively.

SUMMARY

This section provides a general summary of the disclosure, and is not acomprehensive disclosure of its full scope or all of its features.

The embodiments of the present disclosure provide audio playing andtransmitting methods and apparatuses.

In some embodiments of the present disclosure, an audio playing method,including: receiving, by a control apparatus, a first system time datapacket transmitted from a smart TV, wherein the first system time datapacket includes a first system time of the smart TV at which the smartTV transmits the first system time data packet to the control apparatus;calculating, by the control apparatus, a difference between a secondsystem time of the control apparatus at which the control apparatusreceives the first system time data packet and the first system time asa first difference; receiving, by the control apparatus, audio datatransmitted from the smart TV; calculating, by the control apparatus, anetwork delay of transmission of the audio data between the smart TV andthe control apparatus according to the first difference; and abandoning,by the control apparatus, the audio data in response to the networkdelay being greater than a preset threshold.

In some embodiments, said calculating the network delay of transmissionof the audio data between the smart TV and the control apparatusaccording to the first difference includes: obtaining, by the controlapparatus, a third system time by parsing the audio data, wherein thethird system time is a system time of the smart TV at which the smart TVtransmits the audio data; acquiring, by the control apparatus, a fourthsystem time, wherein the fourth system time is a system time at whichthe control apparatus receives the audio data; calculating, by thecontrol apparatus, a difference between the fourth system time and thethird system time as a second difference; and determining, by thecontrol apparatus, a difference between the second difference and thefirst difference as the network delay of transmission of the audio databetween the smart TV and the control apparatus.

In some embodiments, the method further includes: transmitting, by thecontrol apparatus, a command for audio data transmission to the smarttelevision, wherein the command is configured to cause the smarttelevision to perform at least one of the following: transmitting audiodata of a program being played to the control apparatus, turning off adevice speaker of the smart television, or setting the volume output ofthe smart television to be 0.

In some embodiments, the method further includes: receiving, by thecontrol apparatus, a command for initiating an application for remotecontrol of the smart television; and presenting, by the controlapparatus, a first user interface for controlling the smart televisionin response to the command; wherein the first user interface comprises amain control area and a function selection area; wherein the maincontrol area comprises a volume control area and a program switchingarea; wherein the function selection area comprises at least one of thefollowing: a sound transmission tab, a homepage tab configured to returnto a remote controller homepage, or a keyboard tab configured to invokea digital keyboard.

In some embodiments, the method further includes: receiving, by thecontrol apparatus, a selection for the sound transmission tab; andpresenting, by the control apparatus, a second user interface inresponse to the selection for the sound transmission tab; wherein thesecond user interface displays prompt information indicating that asound playing device is the smart television, and a sound transmissionswitching option configured for switching the sound playing devicebetween the smart television and the control apparatus.

In some embodiments, the method further includes: receiving, by thecontrol apparatus, a command for selecting the sound transmissionswitching option; switching, by the control apparatus, the sound playingdevice from the smart TV to the control apparatus; and presenting, bythe control apparatus, a third user interface in response to the commandfor selecting the sound transmission switching option, wherein the thirduser interface displays prompt information indicating that the soundplaying device is the control apparatus.

In some embodiments, the method further includes: transmitting, by thecontrol apparatus, the received audio data to an audio player of thecontrol apparatus upon the sound playing device being switched from thesmart television to the control apparatus.

In some embodiments, the method further includes: receiving, by thecontrol apparatus, a command for closing the sound transmissionswitching option; and transmitting, by the control apparatus, a commandfor stopping sound recording to the smart TV in response to the commandfor closing the sound transmission switching option.

In some embodiments, the method further includes: establishing, by thecontrol apparatus, communication connection with the smart TV beforereceiving the command for initiating the application for remote controlof the smart TV.

In the embodiments of the present disclosure, an audio transmittingmethod, including: transmitting, by a smart TV, a first system time datapacket to a control apparatus, wherein the first system time data packetincludes a first system time of the smart TV at which the smart TVtransmits the first system time data packet to the control apparatus;receiving, by a smart TV, a command for audio data transmissiontransmitted from a control apparatus; and transmitting, by a smart TV,an audio data to the control apparatus, wherein the audio data includesa second system time of the smart TV at which the smart TV transmits theaudio data, such that the control apparatus calculates a network delayof transmission of the audio data between the smart TV and the controlapparatus and determines whether to play the audio data according to thenetwork delay.

In the embodiment of the present disclosure, a control apparatus,including: a memory, configured to store computer readable programcodes; and a processor, configured to execute the computer readableprogram codes to control the control apparatus to: receive a firstsystem time data packet transmitted from a smart TV, wherein the firstsystem time data packet includes a first system time of the smart TV atwhich the smart TV transmits the first system time data packet to thecontrol apparatus; calculate a difference between a second system timeof the control apparatus at which the control apparatus receives thefirst system time data packet and the first system time as a firstdifference; receive audio data transmitted from the smart TV; calculatea network delay of transmission of the audio data between the smart TVand the control apparatus according to the first difference; and abandonthe audio data in response to the network delay being greater than apreset threshold.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:obtain a third system time included in the audio data by parsing theaudio data, wherein the third system time is a system time of the smartTV at which the smart TV transmits the audio data; acquire a fourthsystem time, wherein the fourth system time is a system time at whichthe control apparatus receives the audio data; calculate a differencebetween the fourth system time and the third system time as a seconddifference; and determine a difference between the second difference andthe first difference as the network delay of transmission of the audiodata between the smart TV and the control apparatus.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:transmit a command for audio data transmission to the smart TV, whereinthe command for audio data transmission is configured to cause the smartTV to perform at least one of the following: transmitting audio data ofa program being played to the control apparatus, turning off a devicespeaker of the smart television, or setting the volume output of thesmart TV to be 0.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:receive a command for initiating an application for remote control ofthe smart TV; and present a first user interface for controlling thesmart TV in response to the command; wherein the first user interfaceincludes a main control area and a function selection area; wherein themain control area includes a volume control area and a program switchingarea; wherein the function selection area includes at least one of thefollowing: a sound transmission tab, a homepage tab configured to returnto a remote controller homepage, or a keyboard tab configured to invokea digital keyboard.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:receive a selection for the sound transmission tab; and present a seconduser interface in response to the selection for the sound transmissiontab; wherein the second user interface displays prompt informationindicating that a sound playing device is the smart TV, and a soundtransmission switching option configured for switching the sound playingdevice between the smart television and the control apparatus.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:receive a command for selecting the sound transmission switching option;switch the sound playing device from the smart TV to the controlapparatus; and present a third user interface in response to the commandfor selecting the sound transmission switching option; wherein the thirduser interface displays prompt information indicating that the soundplaying device is the control apparatus.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:transmit the received audio data to an audio player of the controlapparatus upon the sound playing device being switched from the smart TVto the control apparatus.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:receive a command for closing the sound transmission switching option;and transmit a command for stopping sound recording to the smart TV inresponse to the command for closing the sound transmission switchingoption.

In some embodiments, the processor is further configured to execute thecomputer readable program codes to control the control apparatus to:establish communication connection with the smart TV before receivingthe command for initiating the application for remote control of thesmart television.

In the embodiment of the present disclosure, a smart TV, including: amemory, configured to store computer readable program codes; and aprocessor, configured to execute the computer readable program codes tocontrol the smart TV to: transmit a first system time data packet to acontrol apparatus, wherein the first system time data packet includes afirst system time of the smart TV at which the smart TV transmits thefirst system time data packet to the control apparatus; receive acommand for audio data transmission transmitted from a controlapparatus; and transmit an audio data to the control apparatus, whereinthe audio data includes a second system time of the smart TV at whichthe smart TV transmits the audio data, such that the control apparatuscalculates a network delay of transmission of the audio data between thesmart TV and the control apparatus and determines whether to play theaudio data according to the network delay.

In the embodiments of the present disclosure, a machine-readablenon-volatile storage medium, wherein the machine-readable non-volatilestorage medium stores computer readable program codes, and the computerreadable program codes is executed to: receive a first system time datapacket transmitted from a smart TV, wherein the first system time datapacket includes a first system time of the smart TV at which the smartTV transmits the first system time data packet to the control apparatus;calculate a difference between a second system time of the controlapparatus at which the control apparatus receives the first system timedata packet and the first system time as a first difference; receiveaudio data transmitted from the smart TV; calculate a network delay oftransmission of the audio data between the smart TV and the controlapparatus according to the first difference; and abandon the audio datain response to the network delay being greater than a preset threshold.

In the embodiments of the present disclosure, an audio playingapparatus, including: a first unit, configured to receive a first systemtime data packet transmitted from a smart TV, wherein the first systemtime data packet includes a first system time of the smart TV at whichthe smart TV transmits the first system time data packet to the audioplaying apparatus; a second unit, configured to calculate a differencebetween a second system time of the audio playing apparatus at which theaudio playing apparatus receives the first system time data packet andthe first system time as a first difference; a third unit, configured totransmit a command for audio data transmission to a smart TV; a fourthunit, configured to receive audio data transmitted from the smart TV; afifth unit, configured to calculate a network delay of transmission ofthe audio data between the smart TV and the audio playing apparatusaccording to the first difference; and a sixth unit, configured toabandon the audio data in response to the network delay being greaterthan a preset threshold.

In the embodiment of the present disclosure provides a smart TV,including: a first transmitting unit, configured to transmit a firstsystem time data packet to a control apparatus, wherein the first systemtime data packet includes a first system time of the smart TV at whichthe smart TV transmits the first system time data packet to the controlapparatus; a receiving unit, configured to receive a command for audiodata transmission transmitted from a control apparatus; a secondtransmitting unit, configured to transmit an audio data to the controlapparatus, wherein the audio data includes a second system time of thesmart TV at which the smart TV transmits the audio data, such that thecontrol apparatus calculates a network delay of transmission of theaudio data between the smart TV and the control apparatus and determineswhether to play the audio data according to the network delay.

In the embodiments of the present disclosure, an audio transmittingmethod, including: acquiring, by a smart TV, audio data currentlyplayed. adding, the smart TV, invalid audio data instruction informationinto the audio data if the audio data are invalid audio data, andcompresses the audio data to generate an invalid audio data packet;transmitting, the smart TV, the invalid audio data packet to the controlapparatus.

In some embodiments, the method further includes: transmitting the validaudio data to the control apparatus if the audio data are valid audiodata.

In some embodiments, the step of adding, the smart TV, invalid audiodata instruction information into the audio data if the audio data areinvalid audio data, and compresses the audio data to generate an invalidaudio data packet further includes: determining whether all the audiodata are invalid bytes is determine; adding the invalid audio datainstruction information into the invalid bytes if all the audio data arethe invalid bytes; and compressing the invalid audio data to generatethe invalid audio data packet.

In some embodiments, the method further includes: determining the audiodata as the invalid audio data if the acquired audio data are a completeframe of audio data and characters of the frame of audio data are presetcharacters.

In some embodiments, the method further includes: controlling the smartTV to enter a recording state to perform audio recording on smart TVbefore the step of acquiring audio data currently played. In theembodiments of the present disclosure, an audio playing method,including: receiving, by a control apparatus, audio data transmittedfrom the smart TV; parsing, by a control apparatus, the audio data, andabandoning invalid audio data if the audio data are the invalid audiodata.

In some embodiments, the method further includes: playing the audio datawhen the audio data are valid audio data.

In some embodiments, the method further includes: determining whetherthe audio data are invalid audio data according to instructioninformation in the audio data after the audio data sent by the smart TVare received.

In some embodiments, the method further includes: setting theinstruction information located on the previous N bytes of the audiodata, and N is a natural number.

In some embodiments, the method further includes: storing the validaudio data into a playback cache when the audio data are determined asthe valid audio data.

In the embodiment of the present disclosure, a smart TV, including: areceiving unit, configured to receive a command for audio datatransmission transmitted from a control apparatus; an acquisition unit,configured to acquire audio data currently played; a processing unit,configured to add invalid audio data instruction information into theaudio data if the audio data are invalid audio data, and compress theaudio data to generate an invalid audio data packet; a transmittingunit, configured to transmit the invalid audio data packet to a controlapparatus.

In the embodiments of the present disclosure, a control apparatus,including: a receiving unit, configured to receive audio datatransmitted from the smart TV; a processing unit, configured to parsethe audio data, and abandon invalid audio data if the audio data areinvalid audio data; and a playing unit, configured to play the audiodata when the audio data are valid audio data.

In the embodiment of the present disclosure, a computing device,including: a memory, configured to store computer readable programcodes; and a processor, configured to execute the computer readableprogram codes to perform at least one of the above methods.

In the embodiments of the present disclosure, a computer-readablenon-volatile storage medium, which stores computer readable programcodes, and the computer readable program codes is executed by a computerto implement at least one of the above methods.

Further aspects and areas of applicability will become apparent from thedescription provided herein. It should be understood that variousaspects of this disclosure may be implemented individually or incombination with one or more other aspects. It should also be understoodthat the description and specific examples herein are intended forpurposes of illustration only and are not intended to limit the scope ofthe present disclosure.

DRAWINGS

The drawings described herein are for illustrative purposes only ofselected embodiments and not all possible implementations, and are notintended to limit the scope of the present disclosure.

FIG. 1 is a schematic diagram of an interaction example of a smart TVand a control apparatus according to some embodiments of the presentdisclosure.

FIG. 2 is a schematic diagram of a connection state of a mobile deviceand a smart TV according to some embodiments of the present disclosure.

FIG. 3 is a schematic diagram of a first user interface of a mobiledevice according to some embodiments of the present disclosure.

FIG. 4 is a schematic diagram of a second user interface of a mobiledevice according to some embodiments of the present disclosure.

FIG. 5 is a schematic diagram of a third user interface of a mobiledevice according to some embodiments of the present disclosure.

FIG. 6 is a first schematic diagram of an audio playing method accordingto some embodiments of the present disclosure;

FIG. 7 is a first schematic diagram of an audio transmitting methodaccording to some embodiments of the present disclosure.

FIG. 8 is a first schematic diagram of an overall process of delayoptimization according to some embodiments of the present disclosure.

FIG. 9 is a schematic diagram of an audio playing apparatus according tosome embodiments of the present disclosure.

FIG. 10 is a first schematic diagram of a smart TV according to someembodiments of the present disclosure.

FIG. 11 is a first schematic diagram of a control apparatus according tosome embodiments of the present disclosure.

FIG. 12 is a second schematic diagram of a smart TV according to someembodiments of the present disclosure.

FIG. 13 is a second schematic diagram of an audio transmitting methodaccording to some embodiments of the present disclosure.

FIG. 14 is a second schematic diagram of an audio playing methodaccording to some embodiments of the present disclosure.

FIG. 15 is a second schematic diagram of an overall process of delayoptimization according to some embodiments of the present disclosure.

FIG. 16 is a third schematic diagram of a smart TV according to someembodiments of the present disclosure.

FIG. 17 is a second schematic diagram of a control apparatus accordingto some embodiments of the present disclosure.

FIG. 18 is a fourth schematic diagram of a smart TV according to someembodiments of the present disclosure.

FIG. 19 is a third schematic diagram of a control apparatus according tosome embodiments of the present disclosure.

Corresponding reference numerals indicate corresponding parts orfeatures throughout the several views of the drawings.

DETAILED DESCRIPTION

Example embodiments will now be described more fully with reference tothe accompanying drawings.

A mobile device is used as a sound output device of a smart television(smart TV), and a television side captures a current sound in real timeand transmits it to the mobile device for real-time playback. However,after the TV is connected to a mobile phone, the sound may be delayeddue to network reasons and a situation that a playback cache of themobile phone cannot be cleaned up in time.

The embodiments of the present disclosure will be described clearly andfully below in combination with the drawings in the embodiments of thepresent disclosure. Obviously, the embodiments described herein are onlypart of the embodiments of the present disclosure, not all theembodiments. Based on the embodiments in the present disclosure, allother embodiments obtained by those of ordinary skill in the art withoutcreative work shall fall within the protection scope of the presentdisclosure.

Embodiments of the present disclosure provide audio playing andtransmitting methods and apparatuses. Audio data with a long delay timeare abandoned at a control apparatus to reduce playback cache, therebyreducing playback delay and avoiding the phenomenon that the controlapparatus and a smart TV may not synchronize audio data in real time dueto a relatively large network delay.

The embodiments of the present disclosure are described in detail belowwith reference to the drawings of the description. It should be notedthat the order of presentation of the embodiments of the presentdisclosure is merely representative of the order of the embodiments, anddoes not represent the advantages and disadvantages of the technicalsolutions provided by the embodiments.

In the following descriptions, a lot of specific details are describedto provide better illustrations of the embodiments of the presentdisclosure. However, it is apparent for those skilled in the art thatthese specific details may not be used during implementation of theembodiments of the present disclosure.

The term “live television” used in the present disclosure refers toreal-time television production broadcasting or television productionbroadcasting basically synchronized with an event occurrence moment.

The term “Video on Demand” (VOD) used in the present disclosure refersto a system and process for allowing a user to select and watch/listencontents of videos or audios on demand. A VOD system may present contentin categories, so that the content can be watched in real time or thecontent can be downloaded to a storage medium for watching later.

The terms “determine”, “calculate” and “computer calculation” andvariations thereof which are used in the present disclosure may be usedinterchangeably, and include any types of methodologies, processes,arithmetical operations or skills.

Embodiments of the present disclosure provide an application scene ofinteraction between a smart TV, and a control apparatus, such as amobile device.

Referring to a smart TV 100 as shown in FIG. 1 according to someembodiments, the smart TV 100 may be configured with functions includingentertainment, commercial application, social interaction, contentestablishment and/or consumption, and one or more control apparatuses isconfigured to organize and control communication with the smart TV 100.Therefore, it can be understood that the smart TV and/or the controlapparatus may be used for enhancing the user interaction experience,either at home or in a work place.

In some embodiments, the smart TV 100 may be configured to receive andprocess various user and/or device inputs. The smart TV 100 may becontrolled with a mobile device such as a mobile phone, a tabletcomputer, a computer, a notebook computer, a netbook and other smartdevices. For example, the smart TV 100 is controlled by an applicationrunning on a smart device.

In some embodiments, the smart TV 100 may be configured to receiveinputs, including, but not limited to, a video, an audio, a radio,light, tactility and a combination thereof, through various inputdevices. For example, a user can talk to the smart TV 100 byconversation. The smart TV 100 is like a smart personal assistant forsmart devices and a voice-activated navigation application (such as Siriof Apple, Skyvi of Android, Robin, Iris, and other application) toreceive and process voice commands.

The embodiments of the present disclosure provide operation steps of amobile device for a user interface for interacting with a user.

As shown in FIG. 2 , the embodiments of the present disclosure provide aschematic diagram of a connection state between a mobile device and asmart TV. When the smart TV interacts with the mobile device, the mobiledevice may establish communication connection with the smart TVaccording to various connection protocols. Furthermore, the mobiledevice may remotely control the smart TV, or is provided with anapplication for operating and controlling the smart TV.

As shown in FIG. 3 , when the mobile device receives a command forinitiating an application for remote control of the smart TV, the mobiledevice may initiate the application for remote control and present afirst user interface for controlling the smart TV. The first userinterface includes a main control area and a function selection area;wherein the main control area includes a volume control area and aprogram switching area; wherein the function selection area includes atleast one of the following: a tab for indicating sound transmission, ahomepage tab configured to return to a remote controller homepage, or akeyboard tab configured to invoke a digital keyboard. The mobile devicemay perform operations on the first user interface to realize theinteraction with the smart TV. For example, when a user inputs a commandat the volume control area, a volume output of the smart TV may becontrolled.

As shown in FIG. 4 , in response to a selection for the soundtransmission tab received by the mobile device, the mobile devicepresents a second user interface. The second user interface displaysprompt information indicating that a sound playing device is the smartTV, and a sound transmission switching option configured for switchingthe sound playing device between the smart television and the controlapparatus.

As shown in FIG. 5 , in response to a command for selecting the soundtransmission switching option bar received by the mobile device, themobile device presents a third user interface, the sound playing deviceis switched from the smart TV to a mobile device. The third userinterface displays prompt information indicating that the sound playingdevice is the mobile device. In the sound transmission switchingprocess, the smart TV turns the volume of an audio player thereof tosilent or 0, so that the audio data are still played in the audioplayer, but are not output from a speaker, and the audio data areacquired and recorded by the smart TV, and then are transmitted to themobile device.

Upon the smart TV receiving a command for audio data transmission fromthe mobile device, the acquired audio data are encoded into a Pulse CodeModulation (PCM) data stream which is transmitted to the mobile devicethrough a network. The mobile device plays a TV sound in real time.Since the audio data stream is original PCM data, no decoding processingneeds to be performed by the mobile device the data is directlytransmitted into a hardware decoder for decoding playback by the mobiledevice each time the mobile device receives a frame of data.

In a smart TV system based on Linux or Android system, an audiocapturing and encoding function provided by a Central Processing Unit(CPU) of the entire smart TV is used to capture a sound of the currentscreen of the smart TV according to a certain sampling format (e.g. 8KHz sampling rate, 16 Bit sampling precision, and dual track) to provideaudio data in a PCM format, and to transmit the non-compressed data to amobile device through a wired network or a wireless network. The mobiledevice directly transmits the audio data to the hardware decoder fordecoding playback upon receiving the audio data.

Referring to FIG. 6 , in the embodiments of the present disclosure, anaudio playing method which is performed by a control apparatus, includesthe following steps.

Step S101 is to receive a first system time data packet from a smart TV,wherein the first system time data packet includes a first system timeof the smart TV at which the smart TV transmits the first system timedata packet to the control apparatus. For example, the control apparatusis the mobile device.

Step S102 is to calculate a difference between a second system time ofthe control apparatus at which the control apparatus receives the firstsystem time data packet and the first system time as a first difference.

Step S103 is to receive audio data transmitted from the smart TV.

Step S104 is to calculate a network delay of transmission of the audiodata between the smart TV and the control apparatus according to thefirst difference.

Step S105 is to abandon the audio data in response to the network delaybeing greater than a preset threshold.

Through the method above, the playback delay of the audio data receivingend is reduced.

For example, the preset threshold may be 200 ms. When the network delayis more than 200 ms, the audio data are abandoned and not transmittedinto the audio player of the mobile device for playback (it is notnecessary to play audio data with a relatively large delay); and whenthe network delay is less than or equal to the preset threshold, theaudio data are transmitted into the audio player of the mobile devicefor playback. The mobile device may be a mobile phone. Before playingthe audio data, the mobile phone may place the audio data received bythe upper layer into a cache queue, and an audio player of the mobilephone reads the audio data from the cache queue during playing. Afterthe playing is completed, the played audio data may be deleted from thecache queue. If an upper-layer application writes data into the cachequeue too fast, and the player reads the data from the cache queueslowly, more and more data will be cached in this queue.

For example, the control apparatus is a mobile phone; the first systemtime is system time Time1_tv of the smart TV; and the second system timeis system time Time1_phone of the mobile phone. The first differenceTime_systemDiff is calculated in the formula:Time_systemDiff=Time1_phone−Time1_tv. The first system time and thesecond system time may be different. One reason is that the time on thesmart TV is not synchronized with the network (for example, a router isnot connected to an extranet), and the time on the mobile phone issynchronized with the network. Another reason is that the smart TV andthe mobile phone are both synchronized with the network in time, but thesynchronized time of the smart TV and the synchronized time of themobile phone are not completely the same and may have an error rangingfrom several milliseconds to several hundred of milliseconds, and evenabout 1 s.

In some embodiments, step S104 further includes that: the controlapparatus obtains a third system time by parsing the audio data, whereinthe third system time is a system time of the smart TV at which thesmart TV transmits the audio data; the control apparatus acquires afourth system time, wherein the fourth system time is a system time atwhich the control apparatus receives the audio data; the controlapparatus calculates a difference between the fourth system time and thethird system time as a second difference; and the control apparatusdetermines a difference between the second difference and the firstdifference as the network delay of transmission of the audio databetween the smart TV and the control apparatus.

For example, the third system time is system time Time2_tv of the TV;and the fourth system time is system time Time2_phone of the mobilephone.

The second difference Time_netDiff is calculated in the formula:Time_netDiff=Time2_phone−Time2_tv.

The network delay Time_delay is calculated in the formula:Time_delay=Time_netDiff−Time_systemDiff.

Wherein (Time2_phone−Time2_tv) refers to the network delay of thetransmission of the audio data from the smart TV to the mobile phone anda system time difference between the smart TV and the mobile phone, and(Time1_phone−Time1_tv) refers to a system time difference between thesmart TV and the mobile phone (since a data volume transmitted from thesmart TV to the mobile phone only has a time point and no audio data,the network delay in the transmission process is very small and may beomitted); and (Time_netDiff−Time_systemDiff) refers to the network delayof the transmission of the audio data from the smart TV to the mobilephone.

In some embodiments, the method further includes: the control apparatustransmits a command for audio data transmission to the smart TV, whereinthe command for audio data transmission is configured to cause the smartTV to perform at least one of the following: transmit audio data of aprogram being played to the control apparatus, turn off a device speakerof the smart television, or set the volume output of the smart TV to be0.

In some embodiments, the method further includes: the control apparatusreceives a command for initiating an application for remote control ofthe smart TV, and presents a first user interface for controlling thesmart TV in response to the command for initiating the application;wherein the first user interface includes a main control area and afunction selection area; wherein the main control area includes a volumecontrol area and a program switching area; wherein the functionselection area includes at least one of the following: a tab for soundtransmission, a homepage tab for indicating returning to a remotecontroller homepage, or a keyboard tab for indicating invoking a digitalkeyboard.

In some embodiments, the method further includes: in response to aselection for the sound transmission tab received by the controlapparatus, the control apparatus presents a second user interface;wherein the second user interface displays prompt information forindicating that a sound playing device is the smart TV, and a soundtransmission switching option for indicating switching the sound playingdevice between the smart TV and the control apparatus.

In some embodiments, the method further includes: in response to acommand for selecting the option for switching sound transmissionreceived by the control apparatus, the control apparatus presents athird user interface and switches the sound playing device from thesmart TV to the control apparatus; wherein the third user interfacedisplays prompt information indicating that the sound playing device isthe control apparatus.

In some embodiments, the method further includes: the control apparatustransmits the received audio data to an audio player of the controlapparatus upon the sound playing device being switched from the smart TVto the control apparatus.

In some embodiments, the method further includes: in response to acommand for closing the option for switching sound transmission receivedby the control apparatus, the control apparatus transmits a command forstopping sound recording to the smart TV.

In some embodiments, the method further includes: the control apparatusestablishes communication connection with the smart TV before receivingthe command for initiating the application for remote control of thesmart TV.

Referring to FIG. 7 , in the embodiments of the present disclosure, anaudio transmitting method, which is performed by a smart TV, includesthe following steps.

Step S201 is to transmit a first system time data packet to a controlapparatus, wherein the first system time data packet includes a firstsystem time of the smart TV at which the smart TV transmits the firstsystem time data packet to the control apparatus.

The control apparatus may be the mobile phone mentioned above.

Step S202 is to receive a command for audio data transmissiontransmitted from a control apparatus.

Step S203 is to transmit an audio data to the control apparatus, whereinthe audio data includes a second system time of the smart TV when thesmart TV transmits the audio data, such that the control apparatuscalculates a network delay of transmission of the audio data between thesmart TV and the control apparatus and determines whether to play theaudio data according to the network delay.

Through the method, the playback delay of the control apparatus isreduced.

For example, before the smart TV transmitting the audio data in the PCMformat to the mobile phone, current system time information (the smartTV) may be added in front of the audio data in the PCM format.

Referring to FIG. 8 , illustrating an overview flowchart of delayoptimization according to some embodiments of the present disclosure,the main specific processing flow of the smart TV and the mobile phoneis as follows.

The smart TV acquires the current system time Time1_tv of the smart TVafter the connection between the mobile phone and the smart TV isestablished, and transmits the system time Time1_tv to the mobile phone.

The mobile phone acquires the system time Time1_phone of the mobilephone when the system time Time1_tv is received by the mobile phone.

A system time difference Time_systemDiff between the mobile phone andthe smart TV (for different devices such as the smart TV and phone, thesystem time of the mobile phone and the system time of the smart TVacquired at the same time may be different) is calculated according tothe formula:Time_systemDiff=Time1_phone−Time1_tv.

The smart TV acquires the system time Time2_tv when the audio data inthe PCM format is captured by the smart TV each time, and then packs theaudio data in the PCM format and the system time Time2_tv. The packingformat is as shown in Table 1.

TABLE 1 Audio data packet Time (length 8 Byte) Audio data (length 640Byte)

A calculation method of the audio data includes the following.

It is assumed that an audio sampling rate is 8000 Hz, two samplingchannels are provided, a bit depth is 16, and a sampling interval is 20ms, so that the calculation formula (1) of an audio data size per frameis:

$\begin{matrix}{{\frac{{Audio}{sampling}{rate}*{bit}{depth}*{sampling}{channel}}{8*{sampling}{interval}} = {640}}({Byte})} & (1)\end{matrix}$

The mobile phone receives the audio data packet, and then obtains thetime Time2_tv by parsing the data packet. The mobile phone acquires thesystem time Time2_phone of the mobile phone at which the audio datapacket is received by the mobile phone. Another system time differenceTime_netDiff between the mobile phone and the smart TV is calculated inthe formula: Time_netDiff=Time2_phone-Time2_tv.

A real network delay Time_delay is calculated according to a formula:Time_delay=Time_netDiff−Time_systemDiff.

When the network delay Time_delay is greater than a preset threshold Kwhich is, for example, 200 ms, the mobile phone abandons the audio dataand does not transmit the data to its audio player (it does not make anysense to play audio data with a relatively large delay); and when thenetwork delay is less than or equal to the preset threshold K, themobile phone transmits the audio data into its audio player forplayback.

Some embodiments according to the present disclosure is as follows, andthe day Dec. 1, 2018 is taken as an example.

It is assumed that at the beginning of the transmission of the systemtime data packet, the system time Time1_tv of the smart TV is11:11:11:100, and the system time Time1_phone of the mobile phone is11:11:12:110, so that Time_systemDiff is 1.01 s according to the formulaTime_systemDiff=Time1_phone−Time1_tv. That is, the system time of themobile phone is 1.01 s earlier than the system time of the smart TV.

After 2 seconds, the smart TV starts to transmit the audio data to themobile phone, and at the moment, the system time Time2_tv of the smartTV is 11:11:13:100, and the system time Time2_phone when the mobilephone receives the audio data is 11:11:14:210, so that the Time_netDiffis 1.11 s according to the formula Time_netDiff=Time2_phone−Time2_tv.

The Time_delay is 0.1 s according to the above formulaTime_delay=Time_netDiff−Time_systemDiff.

The control apparatus above may be an audio playing apparatus. Referringto FIG. 9 , in some embodiments of the present disclosure, the audioplaying apparatus, including: a first unit 11, configured to receive afirst system time data packet transmitted from a smart TV, wherein thefirst system time data packet includes a first system time of the smartTV at which the smart TV transmits the first system time data packet tothe audio playing apparatus; a second unit 12, configured to calculate adifference between a second system time of the audio playing apparatusat which the audio playing apparatus receives the first system time datapacket and the first system time as a first difference; a third unit 13,configured to transmit a command for audio data transmission to a smartTV; a fourth unit 14, configured to receive audio data transmitted fromthe smart TV; a fifth unit 15, configured to calculate a network delayof transmission of the audio data between the smart TV and the audioplaying apparatus according to the first difference; and a sixth unit16, configured to abandon the audio data in response to the networkdelay being greater than a preset threshold.

Referring to FIG. 10 , in some embodiments of the present disclosure,the smart TV including: a first transmitting unit 21, configured totransmit a first system time data packet to a control apparatus, whereinthe first system time data packet includes a first system time of thesmart TV at which the smart TV transmits the first system time datapacket to the control apparatus;

a receiving unit 22, configured to receive a command for audio datatransmission transmitted from a control apparatus; a second transmittingunit 23, configured to transmit an audio data to the control apparatus,wherein the audio data includes a second system time of the smart TV atwhich the smart TV transmits the audio data, such that the controlapparatus calculates a network delay of transmission of the audio databetween the smart TV and the control apparatus and determines whether toplay the audio data according to the network delay.

Referring to FIG. 11 , in some embodiments of the present disclosurealso, a control apparatus, including: a memory 310, configured to storecomputer readable program codes; and a processor 300, configured toexecute the computer readable program codes to cause the controlapparatus to: receive a first system time data packet transmitted from asmart TV, wherein the first system time data packet includes a firstsystem time of the smart TV at which the smart TV transmits the firstsystem time data packet to the control apparatus; calculate a differencebetween a second system time of the control apparatus at which thecontrol apparatus receives the first system time data packet and thefirst system time as a first difference; receive audio data transmittedfrom the smart TV; calculate a network delay of transmission of theaudio data between the smart TV and the control apparatus according tothe first difference; and abandon the audio data in response to thenetwork delay being greater than a preset threshold.

The audio data is abandoned if the network delay is greater than thepreset threshold, so that the playback delay of the control apparatus isreduced.

The control device further includes a user interface 320 and a businterface 330. The processor 300 is connected to the memory 310 via thebus interface 330, and the user interface 320 is connected to the businterface 330.

In some embodiments, the processor 300 is further configured to executethe computer readable program codes to control the control apparatus toperform the audio playing method above.

Referring to FIG. 12 , in some embodiments of the present disclosure, asmart TV, includes:

a memory 410, configured to store computer readable program codes; and aprocessor 400, configured to execute the computer readable program codesto control the smart TV to: transmit a first system time data packet toa control apparatus, wherein the first system time data packet includesa first system time of the smart TV at which the smart TV transmits thefirst system time data packet to the control apparatus; receive acommand for audio data transmission transmitted from a controlapparatus; and transmit an audio data to the control apparatus, whereinthe audio data includes a second system time of the smart TV at whichthe smart TV transmits the audio data, such that the control apparatuscalculates a network delay of transmission of the audio data between thesmart TV and the control apparatus and determines whether to play theaudio data according to the network delay.

The control apparatus calculates the network delay of transmission ofthe audio data between the smart TV and the control apparatus anddetermines whether to play the audio data according to the networkdelay, thereby reducing the playback delay of the control apparatus.

The smart TV further includes a user interface 420 and a bus interface430. The processor 400 is connected to the memory 410 via the businterface 430, and the user interface 420 is connected to the businterface 430.

In a real-time audio playing process, the smart TV continuously recordssounds and transmits the recorded sounds to the mobile device through anetwork. The recorded sounds are subjected to “valid audio data frame”analysis before being transmitted from the smart TV, and “valid audiodata” are transmitted in real time. If the smart TV does not play asound or video file, a frame of sound recorded by the smart TV iscontinuous 0x00 (0x00 refers to a hexadecimal number, and 0x is theprefix of the hexadecimal number). For such an invalid data frame (nulldata) including all 0x00 data, a frame of network data is also occupiedin a transmission process. After the mobile device receives the invaliddata frame, the mobile device adds the invalid data frame into a cacheof a player, which also increases the playback cache of the mobilephone. If this invalid data frame is specially processed (there is nosound when the 0x00 data are played with the player) and then istransmitted to the mobile device, the network transmission burden may begreatly relieved, and the playback cache of the mobile phone is reduced,thereby effectively minimizing the real-time playback delay of an audio.

Referring to FIG. 13 , in some embodiments of the present disclosure, anaudio transmitting method which is performed by the smart TV, includesthe following steps.

Step S301 is to acquire audio data currently played.

In the real-time audio playing process, the smart TV may continuouslyrecord sounds being played by the system, namely continuously acquirethe audio data of the program currently being played; in the recordingprocess, the smart TV is in a recording stage all the time withoutdetecting whether there is an audio file being output at this moment.

Step S302 is to add an identifier for identifying invalid audio datainto the audio data if the audio data is invalid audio data, and tocompress the audio data to generate an invalid audio data packet.

Step S303 is to transmit the invalid audio data packet to the controlapparatus. Alternatively, if the audio data acquired by the smart TV isthe invalid audio data, the smart TV will not transmit the audio data tothe control apparatus.

Through the method above, the network transmission burden is relieved,and the real-time playback delay of an audio is optimized.

For example, it is assumed that a user selects to transmit a command foraudio data transmission to the control apparatus when a football programis played, and the smart TV starts to record the sounds. In therecording process, the user quits the football program due tomis-operation or the intention to reselect or browse other availableprograms, and at the moment, there is no actual audio data being playedin the audio player. However, since the recording will not be thusstopped, the audio data acquired by the smart TV are actually null whenno football program is played, and the audio data are the so calledinvalid audio data.

In some embodiments, the method further includes: transmitting the validaudio data to the control apparatus if the audio data are valid audiodata.

In some embodiments, the method further includes: determining the audiodata as the invalid audio data if the acquired audio data are a completeframe of audio data and one or more identifier of the frame of audiodata is a preset identifier.

For example, the preset identifier is 0x00. A frame of audio data whereall are 0x00 is called invalid audio data.

In particular, to determine whether a frame of audio data is invaliddata, cyclic detection may be performed on the first and last bytes ofthe frame of data. If a byte of the audio data is not 0x00, the audiodata are determined as valid audio data; and if each byte of the audiodata is 0x00, the audio data are determined as the invalid audio data.

In some embodiments, step S302 further includes: determining whether allthe audio data are invalid bytes; in response to all the audio databeing the invalid bytes, adding an identifier to the invalid bytes, andcompressing the invalid audio data to generate the invalid audio datapacket.

As mentioned above, in a smart TV system developed in accordance withthe Linux or Android system, an audio capturing and encoding functionprovided by a Central Processing Unit (CPU) of the entire smart TV isused to capture a sound of the current screen of the smart TV accordingto a certain sampling format (e.g. 8 KHz sampling rate, 16 Bit samplingprecision, and dual track) to provide audio data in a PCM format. Afterthe smart TV acquires the audio data, the audio data are packed and thentransmitted to the mobile phone. The data packet includes the acquiredaudio data and the current system time of the smart TV. The packingformat is as shown in Table 1 above.

A calculation method of an audio data size per frame includes thefollowing.

It is assumed that an audio sampling rate is 8000 Hz, two samplingchannels are provided, a bit depth is 16, and a sampling interval is 20ms, so that the calculation formula (2) of an audio data size per frameis:

$\begin{matrix}{{\frac{{Audio}{sampling}{rate}*{Bit}{depth}*{Sampling}{channel}}{8*{Sampling}{interval}} = {640}}({Byte})} & (2)\end{matrix}$

When the smart TV acquires the audio data, the next frame of datanormally occupies 640 bytes. If the audio data is valid audio data, thevalid audio data of the 640 bytes is transmitted to the controlapparatus. If the audio data is invalid data, for such an invalid dataframe including all 0x00 data, a frame of network data volume is alsooccupied in a transmission process. After the mobile device receives theinvalid data frame that includes all the 0x00 data, the mobile deviceadds the invalid data frame into a cache of a player, which alsoincreases the playback cache of a mobile phone.

In some embodiments of the present disclosure, these invalid audio datais compressed, not all the 640 bytes are transmitted, but this all 0x00audio data is compressed into M bytes. That is, this invalid audio dataare reassigned as a data stream including M characters, and thecompressed audio data are specifically represented as 0x00 0x00 0x000x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00. M is apositive integer less than 640. In some embodiments, M is more than orequal to 1 and less than or equal to 100.

In some embodiments of the present disclosure, the transmitting of theinvalid audio data is also configured to maintain the communicationconnection between the smart TV and the mobile device. If it isspecified that the smart TV needs to transmit a data packet to themobile device every 20 ms to ensure the communication connection, whenthe smart TV does not transmit the audio data packet in 20 ms, theconnection will be disconnected, causing the mobile device not toreceive the audio data in real time while there is still valid audiodata to be transmitted. Therefore, although there are no actual audiodata, the smart TV may still transmit a data packet to the mobile deviceevery 20 ms.

After the invalid data is compressed, an identifier for indicating thatthe data in the data packet is the invalid data is added in front of thecompressed data in order to enable the mobile device to identify thereceived invalid data and not transmit the data to the player of themobile device. For example, N bytes are added in front of the M bytes,and N is a natural number. The identifier information is located on theprevious 5 bytes of the audio data. The identifier information may berepresented as 0x01 0x02 0x03 0x04 0x05. An agreement can be made withthe control apparatus in advance to select which identifier(s) asidentification information for indicating invalid data.

The generated invalid data packet includes the invalid audio dataidentification information and the M digits of compressed invalid audiodata.

For example, the identification information for indicating invalid audiodata is 0x01 0x02 0x03 0x04 0x05, and all the 0x00 audio data iscompressed into 20 bytes. That is, this period of invalid audio data isreassigned as a data stream of 20 bytes, and the compressed audio datais represented as 0x01 0x02 0x03 0x04 0x05 0x00 0x00 0x00 0x00 0x00 0x000x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00.

In some embodiments, before step S301, the method further includes:controlling the smart TV to enter a recording state to perform audiorecording on the smart TV.

Referring to FIG. 14 , in some embodiments of the present disclosure, anaudio playing method which is performed by the mobile device, includingthe following steps.

Step S401 is to receive audio data transmitted from the smart TV.

Step S402 is to parse the audio data, and to abandon invalid audio dataif the audio data is the invalid audio data.

Through the method, the playback cache of the control apparatus isreduced, and the real-time playback delay of an audio has beenoptimized.

For example, the smart TV is a smart TV. When the audio data received bythe mobile device is the invalid audio data, this piece of invalid audiodata is abandoned and is not written into a cache of a mobile phoneplayer. The audio data is played when the audio data is valid audiodata.

In some embodiments, the audio data is played when the audio data isvalid audio data.

In some embodiments, upon receiving the audio data transmitted from thesmart TV, determining whether the audio data is invalid audio dataaccording to identification information in the audio data.

In some embodiments, the identification information is located in theprevious N bytes of the audio data, and N is a natural number.

For example, the identification information is located in the previous 5bytes of the audio data. The identification information may berepresented as 0x01 0x02 0x03 0x04 0x05. An agreement can be made inadvance to select which identifier(s) as identification information forindicating valid audio data.

In some embodiments, said audio data is played if the audio data is thevalid audio data includes: the valid audio data is stored into aplayback cache if the audio data is determined as the valid audio data.

Before playing the audio data, the mobile phone may place the audio datareceived by the upper layer application into a cache queue, and a systemplayer of the mobile phone reads the data from the cache queue duringplaying. After the playing is completed, the played data may be deletedfrom the cache queue. If an upper-layer application writes data into thecache queue too fast, and the player reads the data from the cache queueslowly, more and more data will be cached in this queue.

Referring to FIG. 15 , illustrating an overview flowchart of delayoptimization according to some embodiments of the present disclosure,the main specific processing flow of the smart TV and the mobile phoneincludes the following processes.

The smart TV captures a sound of the entire machine (the smart TV) uponreceiving the connection information of the mobile device, anddetermines whether the captured sound is a valid audio. A specificdetermination method is further discussed below.

For example, the mobile device may be a mobile phone. After the smart TVacquires a frame of audio data, the smart TV determines whether all thisframe of audio data is 0x00, namely determines whether the data of 640bytes acquired by the smart TV at one time is 0x00. If all the data is0x00, it is determined that this block of data is invalid audio data. Ifa portion of frame data is not the 0x00, but the frame data includesdata such as 0x12, it is determined that this block of data is validaudio data.

When the data acquired by the smart TV is valid audio data, the validaudio data is transmitted to the mobile device frame by frame. When thedata acquired by the smart TV is invalid audio data, the invalid audiodata is optimized firstly, that is, the invalid audio data, which is all0x00, of the 640 bytes is reassigned as a data stream (or false data)including 20 characters. For example, in the data stream including the20 characters, the previous 5 characters may be defined as 0x01 0x020x03 0x04 0x05 (namely the identification information for indicating theinvalid audio data, and the identification information is not limited to0x01 0x02 0x03 0x04 0x05, and the previous 5 characters may also bedefined as 0x01 0x01 0x02 0x02 0x02 and the like), and the latter 15characters are all 0x00, which may be represented as 0x01 0x02 0x03 0x040x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x000x00 0x00. In this way, this block of invalid audio data of 640 bytes iscompressed into data of 20 bytes, and the smart TV then transmits thedata of 20 bytes to the mobile device.

When the mobile device receives the audio data packet transmitted fromthe smart TV, whether the received audio data are valid audio data isdetermined at first. If the mobile device receives the above data streamincluding 20 bytes: 0x01 0x02 0x03 0x04 0x05 0x00 0x00 0x00 0x00 0x000x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00, the previous 5 bytes0x01 0x02 0x03 0x04 0x05 of the data are analyzed to determine that thereceived data is invalid audio data (this block of invalid audio datahas no sound in the smart TV), and no data will be written into a cacheof a mobile phone player, and this block of invalid audio data isabandoned (in this way, audio cached data of a mobile phone system maybe cleared up). If the mobile device receives the data stream of 640bytes instead of the above data including 20 bytes, it is determinedthat the received data is valid audio data, and this block of validaudio data is all written into the cache of the mobile phone player.

Referring to FIG. 16 , in some embodiments of the present disclosure, asmart TV, includes: a receiving unit 31, configured to receive a commandfor audio data transmission transmitted from a control apparatus; anacquisition unit 32, configured to acquire audio data currently beingplayed; a processing unit 33, configured to add identificationinformation to the audio data if the audio data is invalid audio data,and compress the audio data to generate an invalid audio data packet; atransmitting unit 34, configured to transmit the invalid audio datapacket to a control apparatus.

Referring to FIG. 17 , in some embodiments of the present disclosure, ancontrol apparatus, includes: a receiving unit 41, configured to receiveaudio data transmitted from the smart TV; a processing unit 42,configured to parse the audio data, and abandon invalid audio data inresponse to the audio data being invalid audio data; and a playing unit43, configured to play the audio data in response to the audio databeing valid audio data.

Referring to FIG. 18 , in some embodiments of the present disclosure, asmart TV, includes: a processor 600, configured to read a computerprogram in a memory 610 to control the smart TV to: acquire audio datacurrently played; add identification information for indicating invalidaudio data to the audio data in response to the audio data being invalidaudio data, and compress the audio data with identification informationto generate an invalid audio data packet; transmit the invalid audiodata packet to the control apparatus.

Through the smart TV, the network transmission burden is relieved, andthe real-time playback delay of an audio is optimized.

The smart TV further includes a user interface 620 and a bus interface630. The processor 600 is connected to the memory 610 via the businterface 630, and the user interface 620 is connected to the businterface 630.

In some embodiments, the processor 600 is further configured to read thecomputer program to control the smart TV to: transmit the valid audiodata to the control apparatus if the audio data are valid audio data.

In some embodiments, the processor 600 is further configured to read thecomputer program to control the smart TV to: determine whether all theaudio data is invalid bytes; add the identification information forindicating invalid audio data to the audio data if all the audio data isthe invalid bytes; and compress the invalid audio data to generate theinvalid audio data packet.

In some embodiments, the acquired audio data is a complete frame ofaudio data, and the audio data is determined as the invalid audio dataif one or more identifiers of the frame of audio data is a presetidentifier.

In some embodiments, the processor 600 is further configured to read thecomputer program to control the smart TV to: control the smart TV toenter a recording state to perform audio recording in the smart TVbefore acquiring the audio data of a currently played content.

Referring to FIG. 19 , in some embodiments of the present disclosure, acontrol apparatus, includes: a processor 800, configured to execute acomputer program in a memory 810 to cause the control apparatus to:receive audio data transmitted from the smart TV; and parse the audiodata, and abandon invalid audio data in response to the audio data beingthe invalid audio data.

Through the control apparatus, the playback cache of the controlapparatus is cleared, and the real-time playback delay of an audio isoptimized.

The control apparatus further includes a user interface 820 and a businterface 830. The processor 800 is connected to the memory 810 via thebus interface 830, and the user interface 820 is connected to the businterface 830.

In some embodiments, the processor 600 is further configured to executethe computer program to cause the control apparatus to: play the audiodata if the audio data is valid audio data.

In some embodiments, the processor 600 is further configured to executethe computer program to cause the control apparatus to: determinewhether the audio data is invalid audio data according to identificationinformation in the audio data upon receiving the audio data transmittedfrom the smart TV.

In some embodiments, the identification information is located in theprevious N bytes of the audio data, and N is a natural number.

In some embodiments, the processor 600 is further configured to executethe computer program to cause the control apparatus to: store the validaudio data into a playback cache if the audio data is determined as thevalid audio data.

In FIG. 11, 12, 18 or 19 , the bus architecture may include any numberof interconnected buses and bridges, and is particularly composed of oneor more of processors represented by the processors 300, 400, 600 or 800and the various circuits of memories represented by the memories 310,410, 610 or 810 together. The bus architecture may also link variousother circuits such as peripherals, voltage regulators and powermanagement circuits, which are well known in the art and, therefore,will not be further described herein. A bus interface provides aninterface.

The embodiments of the present disclosure provides a display device. Thedisplay device may be a desktop computer, a portable computer, a smartphone, a tablet computer, a Personal Digital Assistant (PDA), and thelike. The display device may include a Central Processing Unit (CPU), amemory, an input/output device, and the like. The input device mayinclude a keyboard, a mouse, a touch screen, and the like, and theoutput device may include a display device, such as a Liquid CrystalDisplay (LCD), a Cathode Ray Tube (CRT), and the like.

For different display devices, in some embodiments, a user interface320, 420, 620 or 820 may be an interface capable of externally andinternally connecting desired devices, and the connected devicesinclude, but not limited to, a keypad, a display, a speaker, amicrophone, a joystick, and the like.

The processor is responsible for managing the bus architecture andperforming routine processing, and the memory may store data used whilethe processor performs operations.

In some embodiments, the processor may be a Central Processing Unit(CPU), an Application Specific Integrated Circuit (ASIC), aField-Programmable Gate Array (FPGA), or a Complex Programmable LogicDevice (CPLD).

The memory may include a Read Only Memory (ROM) and a Random AccessMemory (RAM), and provides the processor with program commands and datawhich are stored in the memory. In the embodiment of the presentdisclosure, the memory may be configured to store a program of any ofthe methods provided by the embodiments of the present disclosure.

The processor is configured to perform any of the methods provided bythe embodiments of the present disclosure according to the obtainedprogram command by calling a program command stored in the memory.

The embodiments of the present disclosure provides a computer storagemedium configured to store a computer program command used by theapparatus provided in the foregoing embodiments of the presentdisclosure, and the computer program command includes a program forperforming any of the methods provided by the foregoing embodiments ofthe present disclosure.

The computer storage medium may be any available media or data storagedevices accessible by a computer, including, but not limited to, amagnetic memory (e.g., a floppy disk, a hard disk, a magnetic tape, aMagneto-Optical disk (MO), etc.), an optical memory (e.g., a CD, a DVD,a BD, an HVD, etc.), a semiconductor memory (e.g., an ROM, an EPROM(Electrically Programmable Read-Only-Memory), an EEPROM (ElectricallyErasable Programmable Read-Only Memory), a non-volatile memory (NANDFLASH), a Solid-State Hard Disk (SSD)), and the like.

Based on the above, the audio transmitting and playing methods and theapparatus which are provided by the embodiments of the presentdisclosure are used to relieve the network transmission burden and clearthe playback cache of the control apparatus, thereby optimizing thereal-time playback delay of the audio. The phenomenon that the controlapparatus may not synchronize the audio data in real time with the smartTV due to a relatively large network delay is avoided.

The audio playing and transmitting methods and apparatuses which areprovided by the embodiments of the present disclosure are used torelieve the network transmission burden and clear the playback cache ofthe control apparatus, thereby optimizing the real-time playback delayof the audio.

Those skilled in the art should understand that the embodiments of thepresent disclosure may be methods, systems or computer program products.Therefore, the present disclosure may adopt the form of a completehardware embodiment, a complete software embodiment, or a software andhardware combination embodiment. In addition, the present disclosure mayadopt the form of a computer program product implemented on one ormultiple computer-available storage media (including, but not limitedto, a magnetic disk memory, an optical memory and the like) includingcomputer-available program codes.

The present disclosure is described by referring to flowcharts and/orblock diagrams of methods, devices (systems) and computer programproducts according to the embodiments of the present disclosure. Itshould be understood that computer program commands may implement eachflow and/or each block in the flowcharts and/or the block diagrams andcombination of the flows and/or the blocks in the flowcharts and/or theblock diagrams. These computer program commands may be provided for ageneral computer, a dedicated computer, an embedded processor orprocessing units of other programmable data processing devices togenerate a machine, thereby making the commands that are executed by thecomputer or the processing units of other programmable data processingdevices generate apparatuses for realizing specified functions in one ormultiple flows of the flowcharts and/or one or multiple blocks of theblock diagrams.

These computer program commands also may be stored in a computerreadable memory capable of guiding the computer or other programmabledata processing devices to work in a specific manner, thereby making thecommands that are stored in the computer readable memory generatemanufactured products that include command apparatuses. The commandapparatuses realize the specified functions in one or multiple flows ofthe flowcharts and/or one or multiple blocks of the block diagrams.

These computer program commands also may be loaded onto the computer orother programmable data processing devices to execute a series ofoperation steps on the computer or other programmable data processingdevices to generate computer implemented processing, so that thecommands executed on the computer or other programmable data processingdevices provide steps for realizing the specified functions in one ormultiple flows of the flowcharts and/or one or multiple blocks of theblock diagrams.

The foregoing description of the embodiments has been provided forpurposes of illustration and description. It is not intended to beexhaustive or to limit the disclosure. Individual elements or featuresof a particular embodiment are generally not limited to that particularembodiment, but, where applicable, are interchangeable and can be usedin a selected embodiment, even if not specifically shown or described.The same may also be varied in many ways. Such variations are not to beregarded as a departure from the disclosure, and all such modificationsare intended to be included within the scope of the disclosure.

What is claimed is:
 1. An audio transmitting method, comprising:transmitting, by a smart television, a first system time data packet toa control apparatus, wherein the first system time data packet comprisesfirst system time of the smart television at which the smart televisiontransmits the first system time data packet to the control apparatus;receiving, by the smart television, a command for audio datatransmission transmitted from the control apparatus; and transmitting,by the smart television, an audio data to the control apparatus inresponse to the command for audio data transmission, wherein the audiodata comprises second system time of the smart television at which thesmart television transmits the audio data, such that the controlapparatus calculates a network delay of transmission of the audio databetween the smart television and the control apparatus according to thefirst system time and the second system time and determines whether toplay the audio data according to the network delay; wherein before thetransmitting, by the smart television, the audio data to the controlapparatus, the method further comprises: determining, by the smarttelevision, whether the audio data is invalid audio data by performingcyclic detection on a first byte and a last byte of a frame of the audiodata; in response to a byte of the frame of the audio data being not apreset character, determining the frame of the audio data as valid audiodata; in response to each byte of the frame of the audio data being thepreset character, determining the frame of the audio data as invalidaudio data; in response to the audio data being invalid audio data,adding, by the smart television, indication information for indicatinginvalid audio data into the audio data, and compressing, by the smarttelevision, the audio data with the indication information to generatean invalid audio data packet; and in response to the audio data beingvalid audio data, determining, by the smart television, to transmit thevalid audio data to the control apparatus.
 2. The audio transmittingmethod according to claim 1, further comprising: turning off, by thesmart television, a speaker of the smart television in response to thecommand for audio data transmission.
 3. The audio transmitting methodaccording to claim 1, further comprising: setting, by the smarttelevision, a volume output of the smart television to be 0 in responseto the command for audio data transmission.
 4. The audio transmittingmethod according to claim 1, further comprising: in response to thecommand for audio data transmission, recording, by the smart television,sound corresponding to a current screen of the smart television, andencapsulating, by the smart television, the recorded sound in a presetformat to obtain the audio data in the preset format, such that thecontrol apparatus directly transmits the audio data in the preset formatto a decoder of the control apparatus for playing.
 5. The audiotransmitting method according to claim 1, further comprising:transmitting, by the smart television, the invalid audio data packet tothe control apparatus.
 6. The audio transmitting method according toclaim 5, further comprising: transmitting, by the smart television, theinvalid audio data packet to the control apparatus periodically tomaintain a communication connection between the smart television and thecontrol apparatus.
 7. A smart television, comprising: a memory,configured to store computer readable program codes; and at least oneprocessor, configured to execute the computer readable program codes tocontrol the smart television to: transmit a first system time datapacket to a control apparatus, wherein the first system time data packetcomprises first system time of the smart television at which the smarttelevision transmits the first system time data packet to the controlapparatus; receive a command for audio data transmission transmittedfrom the control apparatus; and transmit an audio data to the controlapparatus in response to the command for audio data transmission,wherein the audio data comprises second system time of the smarttelevision at which the smart television transmits the audio data, suchthat the control apparatus calculates a network delay of transmission ofthe audio data between the smart television and the control apparatusaccording to the first system time and the second system time anddetermines whether to play the audio data according to the networkdelay; wherein the at least one processor is further configured toexecute the computer readable program codes to control the smarttelevision to: determine whether the audio data is invalid audio data byperforming cyclic detection on a first byte and a last byte of a frameof the audio data; in response to a byte of the frame of the audio databeing not a preset character, determine the frame of the audio data asvalid audio data; in response to each byte of the frame of the audiodata being the preset character, determine the frame of the audio dataas invalid audio data; in in response to the audio data being invalidaudio data, add, by the smart television, indication information forindicating invalid audio data into the audio data, and compress theaudio data with the indication information to generate an invalid audiodata packet; and in respone to the audio data being valid audio data,determine to transmit the valid audio data to the control apparatus. 8.The smart television according to claim 7, wherein the at least oneprocessor is further configured to execute the computer readable programcodes to control the smart television to: turn off a speaker of thesmart television in response to the command for audio data transmission.9. The smart television according to claim 7, wherein the at least oneprocessor is further configured to execute the computer readable programcodes to control the smart television to: set a volume output of thesmart television to be 0 in response to the command for audio datatransmission.
 10. The smart television according to claim 7, wherein theat least one processor is further configured to execute the computerreadable program codes to control the smart television to: in responseto the command for audio data transmission: record sound correspondingto a current screen of the smart television, and encapsulate therecorded sound in a preset format to obtain the audio data in the presetformat, such that the control apparatus directly transmits the audiodata in the preset format to a decoder of the control apparatus forplaying.
 11. The smart television according to claim 7, wherein the atleast one processor is further configured to execute the computerreadable program codes to control the smart television to: transmit theinvalid audio data packet to the control apparatus.
 12. The smarttelevision according to claim 11, wherein the at least one processor isfurther configured to execute the computer readable program codes tocontrol the smart television to: transmit the invalid audio data packetto the control apparatus periodically to maintain a communicationconnection between the smart television and the control apparatus. 13.The smart television according to claim 7, wherein the control apparatuscomprises a mobile terminal.
 14. The smart television according to claim13, wherein the command for audio data transmission is triggered by anoperation for a control on a user interface of the mobile terminal. 15.The smart television according to claim 7, wherein the at least oneprocessor is further configured to execute the computer readable programcodes to control the smart television to: transmit the audio data to thecontrol apparatus frame by frame.
 16. The smart television according toclaim 10, wherein the preset format comprises pulse code modulation(PCM) format.